A Functional Approach to Standard Binary Heaps
نویسنده
چکیده
This paper describes a new and purely functional implementation technique of binary heaps. A binary heap is a tree-based data structure that implements priority queue operations (insert, remove, minimum/maximum) and guarantees at worst logarithmic running time for them. Approaches and ideas described in this paper present a simple and asymptotically optimal implementation of immutable binary heap.
منابع مشابه
Layered Heaps Beating Standard and Fibonacci Heaps in Practice
We consider the classic problem of designing heaps. Standard binary heaps run faster in practice than Fibonacci heaps but have worse time guarantees. Here we present a new type of heap that runs faster in practice than both standard binary and Fibonacci heaps, but has asymptotic insert times arbitrarily better than O(logn), namely O((logn)) for arbitrary positive integer m. Our heap is defined ...
متن کاملA simpler implementation and analysis of Chazelle's soft heaps
Chazelle (JACM 47(6), 2000) devised an approximate meldable priority queue data structure, called Soft Heaps, and used it to obtain the fastest known deterministic comparison-based algorithm for computing minimum spanning trees, as well as some new algorithms for selection and approximate sorting problems. If n elements are inserted into a collection of soft heaps, then up to εn of the elements...
متن کاملAn empirical analysis of algorithmsfor constructing a minimum spanning treeBernard
We compare algorithms for the construction of a minimum spanning tree through large-scale experimentation on randomly generated graphs of diierent structures and diierent densities. In order to extrapolate with conndence, we use graphs with up to 130,000 nodes (sparse) or 750,000 edges (dense). Algorithms included in our experiments are Prim's algorithm (implemented with a variety of priority q...
متن کاملThe Derivation of a Tighter Bound for Top-Down Skew Heaps
In this paper we present and analyze functional programs for a number of priority queue operations. These programs are based upon the top-down skew heaps|a truly elegant data structure|designed by D.D. Sleator and R.E. Tarjan. We show how their potential technique can be used to determine the time complexity of functional programs. This functional approach enables us to derive a potential funct...
متن کاملPattern avoidance in k-ary heaps
In this paper, we consider pattern avoidance in k-ary heaps, where the permutation associated with the heap is found by recording the nodes as they are encountered in a breadth-first search. We enumerate heaps that avoid patterns of length 3 and collections of patterns of length 3, first with binary heaps and then more generally with k-ary heaps.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/1312.4666 شماره
صفحات -
تاریخ انتشار 2013